<template>
	<view class="pad10">
		<u-navbar title="检测记录详情" bgColor="#4a62e7" titleStyle="color:#fff" placeholder autoBack leftIconColor="#fff"></u-navbar>
		
		<view class="backFFF bor_radius4 pad10 c-919EAB mab20" v-if="detailInfo">
			<view class="table">
				<view class="tableValue ftwt c-000 fts16" style="text-align: start;">{{detailInfo.license}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验机构名称</view>
				<view class="tableValue">{{detailInfo.teststation}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验流水号</view>
				<view class="tableValue">{{detailInfo.jylsh}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验次数</view>
				<view class="tableValue">{{detailInfo.testtimes}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验日期</view>
				<view class="tableValue">{{detailInfo.testdate}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">号牌号码</view>
				<view class="tableValue">{{detailInfo.license}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">号牌种类</view>
				<view class="tableValue">{{detailInfo.licensecode}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检测结果</view>
				<view class="tableValue">{{detailInfo.result}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验类型</view>
				<view class="tableValue">{{detailInfo.jclx}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验方法</view>
				<view class="tableValue">{{detailInfo.testtype}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">检验阶段</view>
				<view class="tableValue">{{detailInfo.jcjd}}</view>
			</view>
			<view class="table">
				<view class="tableLabel">阶段状态</view>
				<view class="tableValue">{{detailInfo.jczt}}</view>
			</view>
		</view>
		
		<button class="Btn2 wid95" type="button" @click="goToReport()">查看报告单</button>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				domainNameUrl:'http://'+uni.getStorageSync("IPNumber")+':'+uni.getStorageSync("portNumber"), // 请求地址
				detailInfo:'', // 详情信息
			}
		},
		onLoad(param) {
			this.detailInfo=param.item&&JSON.parse(decodeURIComponent(param.item)) || ''
			console.log(this.detailInfo);
		},
		methods: {
			// 查看报告单详情
			goToReport(){
				uni.navigateTo({
					url:'/pages/inspectionRecord/reportDetail?pageUrl='+this.domainNameUrl + '/vepts/admin/itemdata/changchunApp/item/'+this.detailInfo.jylsh+'/'+this.detailInfo.testtimes
				})
				// let params = {}
				// this.$ajax.myRequest({
				// 	url: this.domainNameUrl + '/vepts/admin/itemdata/changchunApp/item/'+this.detailInfo.jylsh+'/'+this.detailInfo.testtimes,
				// 	data: params,
				// 	method: 'POST',
				// 	success: (res) => {
				// 		console.log(res);
				// 		if (res.data.code == 200 && res.data.data) {
							
				// 		}else{
				// 			this.$all.toast(res.data.msg)
				// 		}
				// 	},
				// })
				
			}
			
		}
	}
</script>

<style lang="scss">
.table{
	display: flex;
	justify-content: space-between;
	padding: 8px;
	font-size: 14px;
	.tableLabel{
		width: 30%;
		margin-right: 10%;
	}
	.tableValue{
		width: 60%;
		text-align: end;
	}
}

</style>
